import request from '../untils/request'

export function apiLogin(data) {
    return request({
        url: "/login",
        method: "POST",
        data
    })
}

export function apiCheckName(name) {
    return request({
        url: `/checkname/${name}`,
        method: "GET",
    })
}

export function apiAddUser(data) {
    return request({
        url: "/users",
        method: "POST",
        data
    })
}

export function apiGetUserInfo(params) {
    return request({
        url: "/userinfo",
        method: "GET",
        params
    })
}

export function apiUpdateImg(data,id){
    return request({
        url:    `/userinfo/upload/${id}`,
        method: "POST",
        data
    })
}

export function apiUpdateUserinfo(data){
    return request({
        url:    `/userinfo/lifeTalk`,
        method: "POST",
        data
    })
}